package kr.saeildamil.androidstudy.ch17;

import android.app.TabActivity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;

public class TabTest3 extends TabActivity {
	TabHost mTab;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		TabHost tabHost = getTabHost();

		Intent int1 = new Intent("kr.saeildamil.androidstudy.ch17.ACTIVITYLIFECYCLE");
		int1.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(tabHost.newTabSpec("tab")
				              .setIndicator("ActivityLifeCycle")
				              .setContent(int1));

		Intent int2 = new Intent(this, SaveState.class);
		//int2.setComponent(new ComponentName("kr.saeildamil.androidstudy.ch17", "kr.saeildamil.androidstudy.ch17.SaveState"));
		int2.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(tabHost.newTabSpec("tab2")
				              .setIndicator("SaveState")
				              .setContent(int2));

		Intent int3 = new Intent(this, SaveCurve.class);
		int3.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(tabHost.newTabSpec("tab3")
				              .setIndicator("SaveCurve")
				              .setContent(int3));
	}
}
